<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath %>">
<meta charset="UTF-8">
<title>理财管理</title>
<style>
	.tab{
		width:500px;
		margin:0px auto;
		
	}
	
	.tab tr{
		height:50px;
	}
	
	.tab td{
		padding:10px;
	}
	
	body{
		background:url('<%=basePath %>res/images/input-bg-05.jpg'); 
	}
</style>
<link href="<%=basePath %>res/css/bootstrap.min.css" rel="stylesheet">

</head>
<body>
	<form action="FinanceServlet?action=addOrUpdate" method="post">
		<input type="hidden" name="financeID" value="${finance.financeID }"/>
		<table class="tab">
			<tr>
				<td align="right">理财类型</td>
				<td align="left">
					<select name="typeID">
						<c:forEach items="${listType }" var="type">
							<c:if test="${finance.typeID == type.typeID }">
								<c:set var="sel" value="selected"></c:set>
							</c:if>
							<c:if test="${finance.typeID != type.typeID }">
								<c:set var="sel" value=""></c:set>
							</c:if>
							
							
							<option value="${type.typeID }" ${sel }>${type.typeName }
								<c:if test="${type.typeFlag==1 }">
									(收入)
								</c:if>
								<c:if test="${type.typeFlag==2 }">
									(支出)
								</c:if>
							
							</option>
						</c:forEach>
					</select>
				</td>
			</tr>
			<tr>
				<td align="right">理财金额</td>
				<td align="left"><input type="money" name="financeAmount" value="${finance.financeAmount }"></td>
			</tr>
			<tr>
				<td align="right">备注</td>
				<td align="left">
					<textarea rows="5" cols="20" name="financeRemarks">${finance.financeRemarks }</textarea>
				</td>
			</tr>
			<tr>
				<td align="right">操作人</td>
				<td align="left">
					${member.memberName }   余额${member.memberBalance }
				</td>
			</tr>
			
			<tr>
				<td align="right"></td>
				<td align="left">
					<input type="submit"  class="btn btn-success" value="保存"/>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>